import 'package:equatable/equatable.dart';
import 'package:backend.core/core/domain/entities/api/api_money_amount.dart';
import 'package:backend.core/core/domain/entities/api/web/api_web_transaction.dart';
import 'package:backend.core/core/domain/entities/api/web/yookassa/api_yookassa_transaction_revocation_info.dart';

abstract class ApiYookassaTransaction extends Equatable implements ApiWebTransaction {
  const ApiYookassaTransaction();

  ApiYookassaTransactionRevocationInfo? get revocationInfo;

  ApiMoneyAmount get incomeAmount;

  @override
  bool get revoked {
    return revocationInfo != null;
  }
}
